package com.hmall.api.client;


import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.Parameters;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient(value="user-service")
public interface UserClient {
//    根据ID集合查询商品详情* GEThttp://localhost:8081/items?ids=1,2,5

    @Operation(description="扣减余额")
    @Parameters({
            @Parameter(name = "pw",description = "支付密码"),
            @Parameter(name = "amount",description = "支付金额")
    })

    @PutMapping("/users/money/deduct")
    void deductMoney(@RequestParam("pw") String pw, @RequestParam("amount") Integer amount);
}
